package day021.prototype;

import java.util.ArrayList;
import java.util.Random;

public class Teacher {
    private Teacher() {
    }

    private static int maxCount = 3;

    private static ArrayList<Teacher> teachers = new ArrayList<>();

    static {
        for (int i = 0; i < maxCount; i++) {
            teachers.add(new Teacher());
        }
    }

    public static Teacher getTeacher() {
        int index = new Random().nextInt(3);
        return teachers.get(index);
    }
}
